package atticcomp;

import org.zkoss.zk.au.Command;
import org.zkoss.zk.au.impl.GenericCommand;
import org.zkoss.zk.ui.HtmlBasedComponent;
import org.zkoss.zk.ui.event.Events;

public class MyPanel extends HtmlBasedComponent {

	private static final long serialVersionUID = 1L;

	static {
		new GenericCommand("onPanelOK", Command.IGNORE_OLD_EQUIV);
		new GenericCommand("onPanelCancel", Command.IGNORE_OLD_EQUIV);
	};

	public String getOuterAttrs() {
		StringBuffer sb = new StringBuffer();
		sb.append(Events.isListenerAvailable(this, "onPanelCancel", true) ? " z.onPanelCancel=\"true\""	: " ");
		sb.append(" " + super.getOuterAttrs());

		return sb.toString();
	}

}
